<?php

class OfficeController extends Zend_Controller_Action
{

    public function init()
    {
        $this->_helper->layout->setLayout('layout_work');
    }

    public function indexAction()
    {
        $registry = Zend_Registry::getInstance();
        $currentUser = $registry->currentUser;
        if ($registry->acl->isAllowed($currentUser->get('role'), 'show_office'))
        {
            $this->view->currentUser = $currentUser;
        } else {
            $this->_redirect(   $this
                                ->view
                                ->url(array('controller' => 'account',
                                            'action' => 'index')));
            return;
        }
    }


}

